#include <stdio.h>
#include <string.h>
#include "person.h"
int main(int argc, char * argv[])
{
  Person p1 = Person_construct(19, "Tom Johnson");
  Person p2 = Person_construct(21, "Mary Smith");
  Person_print(p1);
  Person_print(p2);
  p1 = p2; /* assign p2 to p1, they should be the same */
  Person_print(p1);
  Person_print(p2);
  strcpy(p1.name, "Edward"); /* modify p1's name */
  Person_print(p2); /* p2's name is also changed to Edward */
  Person_destruct(p1);
  Person_destruct(p2); 
  /* program crashes, double free or corruption */
  return 0;
}
